using System.ComponentModel.DataAnnotations;

namespace MonitorPlatform.Data.Entities
{
    public class Application : BaseEntity
    {
        [Required]
        [StringLength(50)]
        public string AppId { get; set; } = string.Empty;

        [Required]
        [StringLength(200)]
        public string AppName { get; set; } = string.Empty;

        [StringLength(1000)]
        public string? Description { get; set; }

        [Required]
        [StringLength(100)]
        public string ApiKey { get; set; } = string.Empty;

        public bool IsActive { get; set; } = true;

        [StringLength(100)]
        public string? CreatedBy { get; set; }

        // Navigation properties
        public virtual ICollection<PerformanceMetric> PerformanceMetrics { get; set; } = new List<PerformanceMetric>();
        public virtual ICollection<ErrorLog> ErrorLogs { get; set; } = new List<ErrorLog>();
        public virtual ICollection<ApiMetric> ApiMetrics { get; set; } = new List<ApiMetric>();
        public virtual ICollection<AlertRule> AlertRules { get; set; } = new List<AlertRule>();
    }
} 